/**
 * VYPe11 Project
 * VYPe11 language compiler.
 * Authors: Jozef Lang (xlangj01), 
 * 			Zoltan Zemko (xzemko01)
 * 2011
 */
package cz.vutbr.fit.VYPe.team18.VYPe11.nodes.function;

import java.io.IOException;

import cz.vutbr.fit.VYPe.team18.VYPe11.nodes.NodesList;

public class ParameterListNode extends NodesList<ParameterNode> {

	@Override
	public void generateTAC() throws IOException {
		// vyberame parametre zo zasobnika, preto treba
		// aby to bolo v opacnom poradi !!!
		for(int i=this.size()-1; i>=0; i--)
		{
			int tIndex=tacCounter.getNextTermIndex();
			writeTAC("popParam", "", "", "_t"+tIndex);
			writeTAC("=", "_t"+tIndex, "", this.get(i).getId().getId());
		}
	}

}
